const state = {
  mainMenu: 0,
  subMenu: '0'
}

const mutations = {
  SET_MAIN_MENU: (state, data) => {
    state.mainMenu = data
  },
  SET_SUB_MENU: (state, data) => {
    state.subMenu = data
  }
}

const actions = {
  setMainMenu({ commit }, data) {
    commit('SET_MAIN_MENU', data)
  },
  setSubMenu({ commit }, data) {
    commit('SET_SUB_MENU', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
